Captures a screenshot after a statement runs and saves it as a PNG file.
Note: Scripts fail if you do not create the directory to save screenshots in before they are saved during playback.
Syntax
CaptureScreenshot(True/False, "FilePath")
Arguments
| Argument | Description |
|---|---|
| True/False | True captures the entire screen. False captures the active window. |
| FilePath | Full path to the file to save the screenshot as. If only the filename is specified, the screenshot is saved in the <WORKSPACEDIR>\Screenshots directory by default. If this argument is not used, the screenshot is saved in the workspace directory as <ScriptName_CurrentTimeStamp>.png. |
Example
CaptureScreenshot(False, "C:\\Testing\\Failures\\LoginWindow.png")